---
# This file is normally provided by our theme.  If this file is deleted,
# the theme one will transparently replace it.
---

// SPDX-License-Identifier: CC-BY-SA-4.0
// Copyright 2020 seL4 Project a Series of LF Projects, LLC.

@charset "utf-8";

// Override defaults for bootstrap variables here.

// $font-size-base:   16px !default;

$spacing-unit:     30px !default;

$table-text-align: left !default;


// "bootstrap-sprockets" must be imported before "bootstrap" and "bootstrap/variables"
@import "bootstrap-sprockets";
@import "bootstrap";


html {
    font-size: $font-size-base;
}

@media print {
	#site-navigation { display: none; }
	#site-header a[href]:after {
	    content: none;
	}
}

table.alttable tr:nth-child(even) {
    background-color: #f0f0f0;
}


//  Menu styling borrowed from rust-www site.
ul.menu {
  font-size: 1em;
  margin: 0;
  padding: 0;
  text-align: center;
}
ul.menu li {
  list-style-type: none;
  margin-top: 0em;
  margin-bottom: 0em;
}
ul.menu h2 {
  font-size: 1.5em;
  font-weight: 500;
  margin: 1em;
  display: inline;
  line-height: 1.5em;
}
ul.menu li>ul {
  margin-top: .5em;
  padding-left: 0em;
  line-height: 1.5em;
}

.menu img {
  margin: 0 auto 1.5em auto;
}
@media (min-width: 992px) {
  ul.menu li.menu {
    margin-top: 3em;
  }
  ul.menu {
    text-align: left;
  }
  .menu img {
    margin: 0;
  }
}


// This styles the toc 
.section-nav {
  background-color: #FFF;
  margin: 5px 0;
  padding: 10px 30px;
  border: 1px solid #E8E8E8;
  border-radius: 3px;
}




/**
 * Tables, This code inspired by minima theme
 * Bootstrap doesn't style tables automatically.
 * These variables are defined by bootstrap
 */
table {
  margin-bottom: $spacing-unit;
  width: 100%;
  text-align: $table-text-align;
  border-collapse: collapse;
  border: 1px solid $gray-lighter;
  tr {
    &:nth-child(even) {
      background-color: lighten($gray-lighter, 3%);
      a {
        color: $link-hover-color
      }
    }
  }
  th, td {
    padding: ($spacing-unit / 3) ($spacing-unit / 2);
  }
  th {
    background-color: darken($gray-lighter, 3%);
    border: 1px solid darken($gray-lighter, 10%);
    border-bottom-color: darken($gray-lighter, 12%);
  }
  td {
    border: 1px solid $gray-lighter;
  }
}

@mixin relative-font-size($ratio) {
  font-size: $font-size-base * $ratio;
}


/**
 * Nav bar.
 */

/* nav bar top settings */
div.breadcrumbs.bootstrap {
  font-size: 1.35rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
  list-style: none;
  background-color: #f1f2ed;
  border-radius: 0.25rem;
}

div.breadcrumbs.bootstrap ol {
  margin-left: 0;
  margin-bottom: 0;
}

.sel-breadcrumb{
  float: left;
}


div.breadcrumbs.bootstrap .breadcrumb-item {
  float: left;
}

/* The ".breadcrumb-item +" part prevents the "/" from being created for the first one */
div.breadcrumbs.bootstrap .breadcrumb-item + .breadcrumb-item::before {
  display: inline-block;
  padding-right: 0.5rem;
  padding-left: 0.5rem;
  color: #818a91;
  content: "/";
}

/*Don't underline the content: "/" part on hover */
div.breadcrumbs.bootstrap .breadcrumb-item + .breadcrumb-item:hover::before {
  text-decoration: none;
}

.sel-version{
  float: right;
  margin-bottom: 0;
}

.sel-version li{
  display: inline-block;
  padding:0rem 0.5rem;
}

.clear{
  clear: both;
}

/**
 * Site footer
 */

 
/**
 * Clearfix
 */
%clearfix:after {
  content: "";
  display: table;
  clear: both;
}


.site-footer {
  border-top: 1px solid $gray-lighter;
  padding: $spacing-unit 0;
}

.footer-heading {
  @include relative-font-size(1.125);
  margin-bottom: $spacing-unit / 2;
}

.social-media-list {
  list-style: none;
  margin-left: 0;
}

.footer-col-wrapper {
  @include relative-font-size(0.9375);
  color: $gray;
  margin-left: -$spacing-unit / 2;
  @extend %clearfix;
}

h2 a,
.api code {
      white-space: nowrap;
}

.icon-resize {
  font-size: 1.2rem;
}

.sidebar-toc {
    overflow-x: hidden; /* Disable horizontal scroll */
}

.sidebar {
  background-color: #f1f2ed;
  border-radius: 0.25rem;
  padding: 1rem;

}

.nav-sidebar > li > a {
  padding-right: 20px;
  padding-left: 20px;
}
.nav-sidebar > .active > a,
.nav-sidebar > .active > a:hover,
.nav-sidebar > .active > a:focus {
  color: #fff;
  background-color: #428bca;
}

/* This adds a unicode character corresponding to .fa-external-link-alt from fontawesome
   to every external link */
a[href*="//"]:not([href*="{{site.url}}"],.skip-icon):after {
  display:inline-block;
  font-style:normal;
  font-variant:normal;
  text-rendering:auto;
  line-height:1;
  font-weight:900;
  font-family: Font Awesome\ 5 Free;
  margin-left: 0.2em;
  content: " \f35d";
}


/* flexbox styling sourced from: https://css-tricks.com/dont-overthink-flexbox-grids/ */
.flex-grid {
  display: flex;
}
.col {
  flex: 1;
  padding: 20px;
}
@media (max-width: 700px) {
  .flex-grid {
    display: block;
  }
}

.flex-grid-thirds {
  display: flex;
  justify-content: space-between;
}
.flex-grid-thirds .col {
  width: 32%;
}
